package com.xintonghua.bussiness.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者：wanxianyi
 * 时间：2018/5/21.
 * 包名：com.xintonghua.bussiness.bean
 */

public class OrderCommit implements Parcelable {
    private List<ProjectBean> cardList;
    private String date;
    private String explain;
    private int shop_id;
    private double totalPrice;
    private int user_id;
    private String time;

    public List<ProjectBean> getCardList() {
        return cardList;
    }

    public void setCardList(List<ProjectBean> cardList) {
        this.cardList = cardList;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getExplain() {
        return explain;
    }

    public void setExplain(String explain) {
        this.explain = explain;
    }

    public int getShop_id() {
        return shop_id;
    }

    public void setShop_id(int shop_id) {
        this.shop_id = shop_id;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public List<ServerBean> getServerList() {
        return serverList;
    }

    public void setServerList(List<ServerBean> serverList) {
        this.serverList = serverList;
    }

    private List<ServerBean> serverList;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeList(this.cardList);
        dest.writeString(this.date);
        dest.writeString(this.explain);
        dest.writeInt(this.shop_id);
        dest.writeDouble(this.totalPrice);
        dest.writeInt(this.user_id);
        dest.writeString(this.time);
        dest.writeList(this.serverList);
    }

    public OrderCommit() {
    }

    protected OrderCommit(Parcel in) {
        this.cardList = new ArrayList<ProjectBean>();
        in.readList(this.cardList, ProductBean.class.getClassLoader());
        this.date = in.readString();
        this.explain = in.readString();
        this.shop_id = in.readInt();
        this.totalPrice = in.readDouble();
        this.user_id = in.readInt();
        this.time = in.readString();
        this.serverList = new ArrayList<ServerBean>();
        in.readList(this.serverList, ServerBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<OrderCommit> CREATOR = new Parcelable.Creator<OrderCommit>() {
        @Override
        public OrderCommit createFromParcel(Parcel source) {
            return new OrderCommit(source);
        }

        @Override
        public OrderCommit[] newArray(int size) {
            return new OrderCommit[size];
        }
    };
}
